﻿function goPage(page)
{
    var homeVisitsScroll = $('#homeVisitsScroll');
    homeVisitsScroll.stop();
    
    var currentLeft = homeVisitsScroll.position().left;

    var newPosition = page * 950;

    homeVisitsScroll.animate(
    {
        left: '+=' +( -newPosition -currentLeft ),
    }
    , 500, 
    function () { });

    $("#homeVisitPageNumbers a").each(
    function(i)
    {               
        $(this).removeClass('homeVisitPageNumberSelected');
    });
       
    $("#page" + page).addClass("homeVisitPageNumberSelected");   
}

$(document).ready(function() {
        
     $("#homeVisitPageNumbers a").each(
    function(i)
    {               
        $(this).addClass('homeVisitPageNumber');
    });

    $("#homeVisitPageNumbers a").first().addClass("homeVisitPageNumberSelected");
});
